﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="price_update.aspx.cs" Inherits="uswinweb.user.price_update" %>
<%@ Import Namespace="LTJ.FrameWork" %>
<%@ Register TagPrefix="win" TagName="pop_shipPortList" Src="../datacontrol/pop_shipPortList.ascx" %>
<%@ Register TagPrefix="win" TagName="pop_purposePortList" Src="../datacontrol/add_pop_purposePortList.ascx" %>
<%@ Register TagPrefix="win" TagName="pop_shipcompList" Src="../datacontrol/add_pop_shipcompList.ascx" %>
<%@ Register TagPrefix="win" TagName="pop_transitPortList" Src="../datacontrol/pop_transitPortList.ascx" %>
<%@ Register TagPrefix="win" TagName="pop_terminalList" Src="../datacontrol/pop_terminalList.ascx" %>
<%@ Register TagPrefix="win" TagName="pop_schedule1" Src="../datacontrol/pop_schedule1.ascx" %>
<%@ Register TagPrefix="win" TagName="pop_schedule2" Src="../datacontrol/pop_schedule2.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>新增</title>
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<link href="../css/comm.css" rel="stylesheet" type="text/css" />
<script src="../js/jquery.js" type="text/javascript"></script>
<script src="../js/jquery-exchange.js" type="text/javascript"></script>
<script src="../js/jquery-choose.js" type="text/javascript"></script>

<link href="../css/lightview.css" type="text/css" rel="stylesheet" />

<script src="../js/prototype.js" type="text/javascript"></script>
<script src="../js/scriptaculous.js?load=effects" type="text/javascript"></script>
<script src="../js/lightview.js" type="text/javascript"></script>
<script src="../js/effects.js" type="text/javascript"></script>
<script src="../js/table.js" type="text/javascript"></script>
<script src="../js/jquery_common.js" type="text/javascript"></script>

<script src="../My97DatePicker/WdatePicker.js" type="text/javascript"></script>
</head>
<body>
<form id="form1" runat="server" method="post" action="">
<div class="repcot" id="repcot">
	<ul class="rept mar_top" id="rept">
		<li>基本信息</li>
		<li>海运净价</li>
		<li>美金费用</li>
		<li>人民币费用</li>
		<li>备注</li>
	</ul>
	<div class="repnr" id="repnr">
		<div class="con">
			<table cellpadding="0" cellspacing="0" border="0" class="adtb">
				<tbody>
					<tr>
						<td width="15%"><p class="zi1">启运港：</p></td>
						<td width="35%">
						<div class="zi2 popxg" style="z-index:150">
							<p class="ip1" id="shipPort_hidd_mino"><%=GetName("ports", rbInfo.loadport)%></p>
                            <input type="hidden" id="shipPort_hidd_luffy" name="shipPort_hidd_luffy" value="<%=rbInfo.loadport%>" />
							<span class="an"></span>
							<div class="cn" style="width:280px;" id="shipPort_hidd_div">
                            <div id="showdata1">
								<win:pop_shipPortList runat="server" ID="pop_shipPortList1"/>
                                </div>
							</div>
						</div>
						</td>
						<td width="15%"><p class="zi1">船公司：</p></td>
						<td width="35%">
						<div class="zi2 popxg" style="z-index:149">
							<p class="ip1" id="shipcomp_hidd_mino"><%= rbInfo.bcode%></p>
                            <input type="hidden" id="shipcomp_hidd_luffy" name="shipcomp_hidd_luffy" value="<%=rbInfo.bcode %>" />
							<span class="an"></span>
							<div class="cn" style="width:280px;" id="shipcomp_hidd_div">
								<div id="shipcompdata">
								<win:pop_shipcompList runat="server" ID="pop_shipcompList1" />
                                </div>
							</div>
						</div>
						</td>
					</tr>
					<tr>
						<td width="15%"><p class="zi1">目的港：</p></td>
						<td>
						<div class="zi2 popxg" style="z-index:148">
							<p class="ip1" id="purposePort_hidd_mino"><%=GetName("ports", rbInfo.destport) %></p>
                            <input type="hidden" id="purposePort_hidd_luffy" name="purposePort_hidd_luffy" value="<%=rbInfo.destport %>" />
							<span class="an"></span>
							<div class="cn" style="width:280px;" id="purposePort_hidd_div">
								<div id="showdata2">
								<win:pop_purposePortList runat="server" ID="pop_purposePortList1"/>
                                </div>
							</div>
							</div>
						</td>
						<td width="15%"><p class="zi1">中转港：</p></td>
						<td>
						<div class="zi2 popxg" style="z-index:147">
							<p class="ip1" id="transitPort_hidd_mino"><%=GetName("ports", rbInfo.tranport) %></p>
                            <input type="hidden" id="transitPort_hidd_luffy" name="transitPort_hidd_luffy" value="<%=rbInfo.tranport %>" />
							<span class="an"></span>
							<div class="cn" style="width:280px;" id="transitPort_hidd_div">
								<div id="showdata3">
								<win:pop_transitPortList runat="server" ID="pop_transitPortList1" />
                                </div>
							</div>
						</div>
						</td>
					</tr>
					<tr>
						<td width="15%"><p class="zi1">码头：</p></td>
						<td width="35%">
						<div class="zi2 popxg" style="z-index:146">
							<p class="ip1" id="terminal_hidd_mino"><%=GetName("dock",rbInfo.pier) %></p>
                            <input type="hidden" id="terminal_hidd_luffy" name="terminal_hidd_luffy" value="<%=rbInfo.pier %>" />
							<span class="an"></span>
							<div class="cn" style="width:340px;" id="terminal_hidd_div">
								<div id="showdata4">
								<win:pop_terminalList runat="server" ID="pop_terminaList" />
                                </div>
							</div>
						</div>
						</td>
                        <td width="15%"><p class="zi1">航程：</p></td>
						<td>
						<div style="float:left"><input id="voyagetxt" name="voyagetxt" onkeyup="clearNoNumPage(this);" type="text" class="soout" value="<%=rbInfo.range %>" onblur="this.className='soout'" onfocus="this.className='soon'" style="width:170px;" /></div>
						</td>
					</tr>
					<tr>
						<td width="15%"><p class="zi1">截关：</p></td>
						<td width="35%">
						<div class="zi2 popxg" style="z-index:145">
							<p class="ip1" style="width:90px" id="schedule1_hidd_mino"><%=rbInfo.schbegin %></p>
                            <input type="hidden" id="schedule1_hidd_luffy" name="schedule1_hidd_luffy" value="<%=rbInfo.schbegin %>" />
							<span class="an"></span>
							<div class="cn" style="width:93px;" id="schedule1_hidd_div">
                            <div id="showdata5">
								<win:pop_schedule1 runat="server" ID="pop_schedule1" />
                                </div>
							</div>
						</div>
                        </td>
                        <td width="15%"><p class="zi1">开船：</p></td>
                        <td>
                        <div class="zi2 popxg" style="z-index:144">
							<p class="ip1" style="width:90px" id="schedule2_hidd_mino"><%=rbInfo.schend %></p>
                            <input type="hidden" id="schedule2_hidd_luffy" name="schedule2_hidd_luffy" value="<%=rbInfo.schend %>" />
							<span class="an"></span>
							<div class="cn" style="width:93px;" id="schedule2_hidd_div">
                            <div id="showdata6">
								<win:pop_schedule2 runat="server" ID="pop_schedule2" />
                                </div>
							</div>
						</div>
						</td>
                    </tr>
                    <tr>
						<td width="15%"><p class="zi1">有效期：</p></td>
						<td colspan="3">
                        <div style=" float:left">
						<input type="text" name="begindate" id="begindate" class="input1" style="width:130px;" onfocus="WdatePicker({skin:'whyGreen',minDate:'<%=System.DateTime.Now.AddYears(-3).ToShortDateString() %>',maxDate:'2020-1-1',startDate:'<%=System.DateTime.Now.ToShortDateString() %>',dateFmt:'yyyy-MM-dd'})" errdealmode="2" readonly="readonly" value="<%=rbInfo.validbegin %>" />
                        至
			            <input type="text" name="enddate" id="enddate" class="input1" style="width:130px;" onfocus="WdatePicker({skin:'whyGreen',minDate:'<%=System.DateTime.Now.AddYears(-3).ToShortDateString() %>',maxDate:'2020-1-1',startDate:'<%=System.DateTime.Now.ToShortDateString() %>',dateFmt:'yyyy-MM-dd'})" errdealmode="2" readonly="readonly"  value="<%=rbInfo.validend %>" />
						</div>
                        </td>
					</tr>
				</tbody>
			</table>
		</div>
		<div class="con">
			<table border="0" cellpadding="0" cellspacing="0" class="edtb" id="norprice">
				
				<tbody>
					<tr>
						<td class="co2">类别</td>
						<td class="co2">VIP报价</td>
						<td class="co2">注册客户价</td>
						<td class="co2">外部公开价</td>
					</tr>
                    <%foreach (System.Data.DataRow dr in netpricespecsTab.Rows)
                      { %>
					<tr>
						<td class="co2"><%=dr["name"]%></td>
						<td>
						<p class="zi2"><input id="vip_<%=dr["tcode"].ToString().Trim() %>_txt" value="<%=RouteBases.ReturnRoutePrice(rbInfo.feecollect,"netpricespecs",dr["tcode"].ToString(),dr["tcode"].ToString(),"vipprice")%>"  name="vip_<%=dr["tcode"].ToString().Trim() %>_txt" type="text" class="soout" onblur="this.className='soout'" onfocus="this.className='soon'" style="width:170px;" /></p>
						<p class="zi2">
							<span class="arw"><a href="#" onclick="addnum('vip_<%=dr["tcode"].ToString().Trim() %>_txt')"><img src="../images/arrow_tp.gif" /></a>
							<a href="#" onclick="reducenum('vip_<%=dr["tcode"].ToString().Trim() %>_txt')"><img src="../images/arrow_bt2.gif" /></a></span>
						</p></td>
						<td><p class="zi2"><input id="reg_<%=dr["tcode"].ToString().Trim() %>_txt" value="<%=RouteBases.ReturnRoutePrice(rbInfo.feecollect,"netpricespecs",dr["tcode"].ToString(),dr["tcode"].ToString(),"regprice")%>" name="reg_<%=dr["tcode"].ToString().Trim() %>_txt" type="text" class="soout" onblur="this.className='soout'" onfocus="this.className='soon'" style="width:170px;" /></p>
						<p class="zi2">
							<span class="arw"><a href="#" onclick="addnum('reg_<%=dr["tcode"].ToString().Trim() %>_txt')"><img src="../images/arrow_tp.gif" /></a>
							<a href="#" onclick="reducenum('reg_<%=dr["tcode"].ToString().Trim() %>_txt')"><img src="../images/arrow_bt2.gif" /></a></span>
						</p></td>
						<td><p class="zi2"><input id="foreign_<%=dr["tcode"].ToString().Trim() %>_txt" value="<%=RouteBases.ReturnRoutePrice(rbInfo.feecollect,"netpricespecs",dr["tcode"].ToString(),dr["tcode"].ToString(),"openprice")%>" name="foreign_<%=dr["tcode"].ToString().Trim() %>_txt" type="text" class="soout" onblur="this.className='soout'" onfocus="this.className='soon'" style="width:170px;" /></p>
						<p class="zi2">
							<span class="arw"><a href="#" onclick="addnum('foreign_<%=dr["tcode"].ToString().Trim() %>_txt')"><img src="../images/arrow_tp.gif" /></a>
							<a href="#" onclick="reducenum('foreign_<%=dr["tcode"].ToString().Trim() %>_txt')"><img src="../images/arrow_bt2.gif" /></a></span>
						</p></td>
					</tr>
                    <%} %>
				</tbody>
			</table>
		</div>


        <div class="con">
			<table border="0" cellpadding="0" cellspacing="0" class="edtb">
				<tbody>
					<tr>
						<td class="co2">类别</td>
                        <%
                            foreach (System.Data.DataRow drr in netpricespecsTab.Rows)
                            { %>
                            <td class="co2"><%=drr["name"] %></td>
                        <%} %>
					</tr>
                    <%
                        foreach (System.Data.DataRow dr in usdfeeTab.Rows)
                      {%>
					<tr>
						<td  class="co2"><%=dr["name"]%></td>
                        <%
                        foreach (System.Data.DataRow drr in netpricespecsTab.Rows)
                        { 
                             %>
                        <%if (dr["name"].ToString().Trim() == "其他")
                          { %>
						<td><p class="zi2"><input value="<%=RouteBases.ReturnRoutePrice(rbInfo.feecollect,"usdfee",dr["tcode"].ToString(),drr["tcode"].ToString(),"vipprice")%>"  id="usdfee_<%=drr["tcode"].ToString().Trim() %>_<%=dr["tcode"].ToString().Trim() %>_txt" name="usdfee_<%=drr["tcode"].ToString().Trim() %>_<%=dr["tcode"].ToString().Trim() %>_txt"  type="text" class="soout" onblur="this.className='soout'" onfocus="this.className='soon'" style="width:170px;" /></p>
					</td>
                        <%}
                          else
                          { %>
						<td><p class="zi2"><input value="<%=RouteBases.ReturnRoutePrice(rbInfo.feecollect,"usdfee",dr["tcode"].ToString(),drr["tcode"].ToString(),"vipprice")%>"  id="usdfee_<%=drr["tcode"].ToString().Trim() %>_<%=dr["tcode"].ToString().Trim() %>_txt" name="usdfee_<%=drr["tcode"].ToString().Trim() %>_<%=dr["tcode"].ToString().Trim() %>_txt" onkeyup="clearNoNumPage(this)" type="text" class="soout" onblur="this.className='soout'" onfocus="this.className='soon'" style="width:170px;" /></p>
						<p class="zi2">
							<span class="arw"><a href="#" onclick="addnum('usdfee_<%=drr["tcode"].ToString().Trim() %>_<%=dr["tcode"].ToString().Trim() %>_txt')"><img src="../images/arrow_tp.gif" /></a>
							<a href="#" onclick="reducenum('usdfee_<%=drr["tcode"].ToString().Trim() %>_<%=dr["tcode"].ToString().Trim() %>_txt')"><img src="../images/arrow_bt2.gif" /></a></span>
						</p></td>
                          <%} %>
                    <%
                            } %>
					</tr>

                    <%
                      } %>
				</tbody>
			</table>
		</div>
        <div class="con">
			<table border="0" cellpadding="0" cellspacing="0" class="edtb">
				<tbody>
					<tr>
						<td class="co2">类别</td>
                        <%
                            foreach (System.Data.DataRow drr in netpricespecsTab.Rows)
                            { %>
                            <td class="co2"><%=drr["name"] %></td>
                        <%} %>
					</tr>
                    
                    <%foreach (System.Data.DataRow dr in rmbfeeTab.Rows)
                      { %>
					<tr>
						<td class="co2"><%=dr["name"] %></td>
                        <%
                            foreach (System.Data.DataRow drr in netpricespecsTab.Rows)
                            { 
                             %>
						<td><p class="zi2"><input value="<%=RouteBases.ReturnRoutePrice(rbInfo.feecollect,"rmbfee",dr["tcode"].ToString(),drr["tcode"].ToString(),"vipprice")%>" id="rmbfee_<%=drr["tcode"].ToString().Trim() %>_<%=dr["tcode"].ToString().Trim() %>_txt" name="rmbfee_<%=drr["tcode"].ToString().Trim() %>_<%=dr["tcode"].ToString().Trim() %>_txt" onkeyup="clearNoNumPage(this)" type="text" class="soout" onblur="this.className='soout'" onfocus="this.className='soon'" style="width:170px;" /></p>
						<p class="zi2">
							<span class="arw"><a href="#" onclick="addnum('rmbvip_<%=dr["tcode"].ToString().Trim() %>_txt_<%=drr["tcode"].ToString().Trim() %>')"><img src="../images/arrow_tp.gif" /></a>
							<a href="#" onclick="reducenum('rmbvip_<%=dr["tcode"].ToString().Trim() %>_txt_<%=drr["tcode"].ToString().Trim() %>')"><img src="../images/arrow_bt2.gif" /></a></span>
						</p></td>
                        <%} %>
					</tr>
                    
                    <%
                      } %>
				</tbody>
			</table>
		</div>
		<div class="con">
			<textarea name="beizhu" id="beizhu" style="width:450px" cols="" rows="8" ><%=rbInfo.bio%></textarea>
		</div>
	</div>
	<p class="insa">
		<span><input class="save" name="" type="submit" value="保存并提交" /></span>
	</p>
</div>
</form>
</body>
<script type="text/javascript">
    jQuery(document).ready(function () {
        jQuery("#repcot").Exchange({ MIDS: "rept", CIDS: "repnr", count: 4, mousetype: 0 });
        choose("popxg");
        jQuery("#norprice").find("input[type=text]").each(function () {
            jQuery(this).keyup(function () {
                jQuery(this).val(jQuery(this).val().replace(/[^-?(\[1-9\]\d*.\d*|0.\d*\[1-9\]\d*|0?.0+|0)$]/g, ''));
                //jQuery(this).val(jQuery(this).val().replace(/[^\d.]/g, ""));
                //必须保证第一个为数字而不是.
                jQuery(this).val(jQuery(this).val().replace(/^\./g, ""));
                //保证只有出现一个.而没有多个.
                jQuery(this).val(jQuery(this).val().replace(/\.{2,}/g, "."));
                //保证.只出现一次，而不能出现两次以上
                jQuery(this).val(jQuery(this).val().replace(".", "$#$").replace(/\./g, "").replace("$#$", "."));
                if (jQuery(this).val() == '') {
                    jQuery(this).val(0);
                }
            });
        });
    });
</script>
</html>
